﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jzy.Core.Common;
using ECommerce.Model.Advertisement;

namespace ECommerce.DAL.Advertisement
{
    public class AdvertisementDAL : BaseDAL
    {
        public AdvertisementInfo GetInfoByName(string name)
        {
            string sql = "select * from Advertisement where Name=@p0";
            List<AdvertisementInfo> list = dbOper.Query<AdvertisementInfo>(sql, name);
            if (list.Count > 0)
            {
                return list.First();
            }
            else
            {
                return null;
            }
        }
    }

}
